Generally, state information or a small piece of data may be sent from a website and stored on a user's web browser. This state information may also be referred to as a cookie, which may also be known as an HTTP cookie, web cookie, web-based cookie, or browser cookie. A cookie may be generally a small piece of data sent from a website and stored in a user's web browser while a user is browsing a website. When the user browses the same website in the future, the data stored in the cookie can be retrieved by the website to notify the website of the user's previous activity. Cookies were designed to be a reliable mechanism for websites to remember the state information of the website or activity the user had taken in the past. This state information may include clicking particular buttons, logging in, or a record of which pages were visited by the user even months or years ago.
Other kinds of cookies perform essential functions in the modern Web. Perhaps most importantly, authentication cookies are the most common method used by web servers to know whether the user is logged in or not, and which account they are logged in under. Without such a mechanism, the site would not know whether to send a page containing sensitive information, or require the user to authenticate himself by logging-in. The security of an authentication cookie generally depends on the security of the issuing website and the user's web browser. If not implemented correctly, a cookie's data can be intercepted by someone trying to gain unapproved access to the user's data and possibly to the originating website.